home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 4.9 KB | 136 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWUtil.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWUTIL_H
- #define FWUTIL_H
-
- #ifndef _STORUTIL_
- #include <StorUtil.h>
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- #ifndef SOM_ODRefCntObject_xh
- #include <RefCtObj.xh>
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODShape;
- class ODStorageUnit;
- class ODFrame;
-
- class FW_CFrame;
- class FW_CPoint;
- class FW_CRect;
-
- //========================================================================================
- // Storage Utilities
- //========================================================================================
-
- FW_Boolean FW_SUExistsThenFocus(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName prop,
- ODValueType val);
- void FW_SUForceFocus(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName prop,
- ODValueType val);
- void FW_SUAddPropValue(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName prop,
- ODValueType val);
- void FW_SURemoveProperty(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName prop);
-
- //========================================================================================
- // utilities
- //========================================================================================
-
- FW_Boolean FW_IsInLimbo(Environment* ev, ODFrame* frame);
-
- //========================================================================================
- // Coordinate conversion utilities
- //========================================================================================
-
- void FW_ContentToFrame(Environment* ev, ODFrame* frame, ODShape* shape);
- void FW_FrameToContent(Environment* ev, ODFrame* frame, ODShape* shape);
- void FW_ContentToFrame(Environment* ev, ODFrame* frame, FW_CPoint& point);
- void FW_FrameToContent(Environment* ev, ODFrame* frame, FW_CPoint& point);
- void FW_ContentToFrame(Environment* ev, ODFrame* frame, FW_CRect& rect);
- void FW_FrameToContent(Environment* ev, ODFrame* frame, FW_CRect& rect);
-
- void FW_ContentToWindow(Environment* ev, ODFacet* facet, ODShape* shape);
- void FW_WindowToContent(Environment* ev, ODFacet* facet, ODShape* shape);
- void FW_ContentToWindow(Environment* ev, ODFacet* facet, FW_CPoint& point);
- void FW_WindowToContent(Environment* ev, ODFacet* facet, FW_CPoint& point);
- void FW_ContentToWindow(Environment* ev, ODFacet* facet, FW_CRect& rect);
- void FW_WindowToContent(Environment* ev, ODFacet* facet, FW_CRect& rect);
-
- void FW_FrameToWindow(Environment* ev, ODFacet* facet, ODShape* shape);
- void FW_WindowToFrame(Environment* ev, ODFacet* facet, ODShape* shape);
- void FW_FrameToWindow(Environment* ev, ODFacet* facet, FW_CPoint& point);
- void FW_WindowToFrame(Environment* ev, ODFacet* facet, FW_CPoint& point);
- void FW_FrameToWindow(Environment* ev, ODFacet* facet, FW_CRect& rect);
- void FW_WindowToFrame(Environment* ev, ODFacet* facet, FW_CRect& rect);
-
- //========================================================================================
- // Global Inline Methods
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_ReleaseODObject
- //----------------------------------------------------------------------------------------
- inline void FW_ReleaseODObject(Environment* ev, ODRefCntObject* odObject)
- {
- if (odObject)
- odObject->Release(ev);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_SUForceFocus
- //----------------------------------------------------------------------------------------
- inline void FW_SUForceFocus(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName prop,
- ODValueType val)
- {
- ODSUForceFocus(ev, su, prop, val);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_SUExistsThenFocus
- //----------------------------------------------------------------------------------------
- inline FW_Boolean FW_SUExistsThenFocus(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName prop,
- ODValueType val)
- {
- return ODSUExistsThenFocus(ev, su, prop, val);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_SURemoveProperty
- //----------------------------------------------------------------------------------------
- inline void FW_SURemoveProperty(Environment* ev,
- ODStorageUnit* su,
- ODPropertyName prop)
- {
- ODSURemoveProperty(ev, su, prop);
- }
-
- #endif
-